<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>	
<%@ include file="/pub/headmeta.jsp" %>
</head>
<body class="edit-bgr-color">
	<div class="right-head"><span class="right-head-font">新增性格</span></div>
	<div align="center" style="width: 98%">	
		<form id="addForm" method="post" enctype="multipart/form-data">			
			<table cellpadding="5" style="width: 600px; font-size: 12px;">
				<tr>
					<td width="35%" align="right">性格名称：</td>
					<td width="65%" align="left"><input type="text" name="name" id="name" style="width: 80%" required="required"/>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>
				<tr>
					<td align="right">性格描述：</td>
					<td align="left"><textarea name="note" id="note" style="width:80%" rows="5"></textarea>&nbsp;&nbsp;<font color='red'>*</font></td>					
				</tr>				
			</table>
			<br>			
			<div class="edit-line"></div>
			<input  type="button" class="button-1" value="新增" onclick="doAdd();"/>
			<input  type="button" class="button-1" value="重置" onclick="resetEx(this.form);"/>						
			<input  type="button" class="button-1" value="返回" onclick="back();"/>
		</form>
	</div>
</body>
</html>
<script type="text/javascript">
<!--
var power;
//自动调用初始化
$(document).ready(function(){	

});

//新增
function doAdd() {
	if ($("#name").val() == ""){
		alert('性格名称不能为空！');
		return;
	}
	if ($("#note").val() == ""){
		alert('性格描述不能为空！');
		return;
	}
	
	var form=$("#addForm");
	form.attr("action","${ctx}/kid!add.action"); 
	form.submit();		
}

//返回
function back(){
	location.href="${ctx}/kid!viewList.action";
}
//-->
</script>
